var webpack = require('webpack');
var ExtractTextPlugin = require('extract-text-webpack-plugin');//用于抽取css
module.exports = {
    context: __dirname + '/App',
    entry: ['./index.js'],
    output: {
        path: __dirname,
        filename: "bundle.js",
        publicPath:''
    },
    module: {
        loaders: [{
            test: /\.js|jsx$/,
            loader:'babel-loader',
            exclude:/node_modules/,
            include:__dirname,
            query:{
                presets: ['es2015','react']
            }
        },{
            test: /\.less$/,
            loader: ExtractTextPlugin.extract('style-loader','css-loader!less-loader'),
            exclude: /node_modules/
        }]
    },
    plugins:[
        new webpack.BannerPlugin("头部注释 by HitoTright"),
        new ExtractTextPlugin("./index.css")
    ]
};